package com.rds.common.core.domain.entity;

import com.rds.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;


/**
 * 文件附件实体表(rda_file)
 */
public class File extends BaseEntity
{
    /** ID */
    private Long Id;

    /*添加附件Id**/
    private Long fileId;

    /** 文件名称 */
    private String fileName;

    /** 文档id */
    private Long docId;

    /** 路径 */
    private String path;


    /** 文件大小 */
    private String fileSize;

    /** 操作用户名 */
    private String userName;

    /** 版本 */
    private String revision;

    /** 状态：1生效、2失效 */
    private Integer status;

    /**当前文件是否被锁定**/
    private boolean locked;

    /**锁定者**/
    private String locker;

    /**当前对象描述**/
    private String description;

    /*更新原因(如果涉及文件更新时填写)**/
    private String reason;

    /** 格式(不与数据库对应) */
    private String fileSuffix;

    public Long getId() {
        return Id;
    }

    public void setId(Long id) {
        Id = id;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public Long getDocId() {
        return docId;
    }

    public void setDocId(Long docId) {
        this.docId = docId;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }


    public String getFileSize() {return fileSize;}

    public void setFileSize(String fileSize) {this.fileSize = fileSize;}

    public String getUserName() {return userName;}

    public void setUserName(String userName) {this.userName = userName;}

    public String getRevision() {return revision;}

    public void setRevision(String revision) {this.revision = revision;}

    public String getFileSuffix() {return fileSuffix;}

    public void setFileSuffix(String fileSuffix) {this.fileSuffix = fileSuffix;}

    /**
     * 获取字段 status [状态：1生效、2失效]
     */
    public Integer getStatus() {return status;}

    /**
     * 设置字段 status [状态：1生效、2失效]
     */
    public void setStatus(Integer status) {this.status = status;}


    public boolean isLocked() {
        return locked;
    }

    public String getLocker() {
        return locker;
    }

    public String getDescription() {
        return description;
    }

    public String getReason() {
        return reason;
    }

    public void setLocked(boolean locked) {
        this.locked = locked;
    }

    public void setLocker(String locker) {
        this.locker = locker;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }

    public Long getFileId() {
        return fileId;
    }

    public void setFileId(Long fileId) {
        this.fileId = fileId;
    }


    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("Id", getId())
            .append("path", getPath())
            .append("createTime", getCreateTime())
            .append("modifyTime", getUpdateTime())
            .append("docId", getDocId())
            .append("fileId",getFileId())
            .append("fileName", getFileName())
            .append("fileSize", getFileSize())
            .append("userName", getUserName())
            .append("revision", getRevision())
            .append("fileSuffix", getFileSuffix())
            .append("status", getStatus())
            .append("locked",isLocked())
            .append("locker",getLocker())
            .append("description",getDescription())
            .append("reason",getReason())
            .toString();
    }
}
